/*
 * Copyright (c) 2017, Li Bo/Alex Lee All rights reserved.
 * 
 * http://www.libo4dream.club/
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
 
package com.hyts.socketio.listener;

import com.corundumstudio.socketio.SocketIOClient;
import com.corundumstudio.socketio.listener.ExceptionListener;
import io.netty.channel.ChannelHandlerContext;

import java.util.List;

/**
 * @ClassName: SocketExceptionListener
 * @Description: SocketIO异常监听器
 * @author: LiBo/Alex Lee
 * @date: 2017年10月7日 下午1:20:52
 * @email: alexlibochn@china-pui.com.cn/alex.link@foxmail.com
 */
public class SocketExceptionListener implements ExceptionListener {

	
	/* (non Javadoc)
	 * @Title: onEventException
	 * @Description: TODO
	 * @param e
	 * @param args
	 * @param client
	 * @see com.corundumstudio.socketio.listener.ExceptionListener#onEventException(java.lang.Exception, java.util.List, com.corundumstudio.socketio.SocketIOClient)
	 */
	@Override
	public void onEventException(Exception e, List<Object> args,
			SocketIOClient client) {
		System.out.println(e.getLocalizedMessage());
		System.out.println(e.getMessage());
		System.out.println(args);

	}

	/* (non Javadoc)
	 * @Title: onDisconnectException
	 * @Description: TODO
	 * @param e
	 * @param client
	 * @see com.corundumstudio.socketio.listener.ExceptionListener#onDisconnectException(java.lang.Exception, com.corundumstudio.socketio.SocketIOClient)
	 */
	@Override
	public void onDisconnectException(Exception e, SocketIOClient client) {
		// TODO Auto-generated method stub

	}

	/* (non Javadoc)
	 * @Title: onConnectException
	 * @Description: TODO
	 * @param e
	 * @param client
	 * @see com.corundumstudio.socketio.listener.ExceptionListener#onConnectException(java.lang.Exception, com.corundumstudio.socketio.SocketIOClient)
	 */
	@Override
	public void onConnectException(Exception e, SocketIOClient client) {
		// TODO Auto-generated method stub

	}

	/* (non Javadoc)
	 * @Title: onMessageException
	 * @Description: TODO
	 * @param e
	 * @param data
	 * @param client
	 * @see com.corundumstudio.socketio.listener.ExceptionListener#onMessageException(java.lang.Exception, java.lang.String, com.corundumstudio.socketio.SocketIOClient)
	 */
	@Override
	public void onMessageException(Exception e, String data,
			SocketIOClient client) {
		// TODO Auto-generated method stub

	}

	/* (non Javadoc)
	 * @Title: onJsonException
	 * @Description: TODO
	 * @param e
	 * @param data
	 * @param client
	 * @see com.corundumstudio.socketio.listener.ExceptionListener#onJsonException(java.lang.Exception, java.lang.Object, com.corundumstudio.socketio.SocketIOClient)
	 */
	@Override
	public void onJsonException(Exception e, Object data, SocketIOClient client) {
		// TODO Auto-generated method stub

	}

	/* (non Javadoc)
	 * @Title: exceptionCaught
	 * @Description: TODO
	 * @param ctx
	 * @param e
	 * @return
	 * @throws Exception
	 * @see com.corundumstudio.socketio.listener.ExceptionListener#exceptionCaught(io.netty.channel.ChannelHandlerContext, java.lang.Throwable)
	 */
	@Override
	public boolean exceptionCaught(ChannelHandlerContext ctx, Throwable e)
			throws Exception {
		// TODO Auto-generated method stub
		return false;
	}

}
